#! /bin/sh

DIST=/boot/apps
DIST=/boot/home/config/be/internet
DIST=.

if [ `uname -r` == "5.0" ]; then
	NET=net
	SYSTEM_INCLUDE_PATHS=
else
  NET="bnetapi bind socket"
  SYSTEM_INCLUDE_PATHS='/boot/develop/headers/be/bone/netinet /boot/develop/headers/be/bone /boot/develop/headers/be/bone/sys'
fi

cd `dirname $0`

rm -fr obj.x86

SRC=`ls src/*.cpp src/ColumnListView/*.cpp src/SplitPane/*.cpp`

echo "NAME= 2ch+" > Makefile
echo "TYPE= APP" >> Makefile
echo "SRCS=" ${SRC} >> Makefile
echo "RSRCS= 2ch+.rsrc" >> Makefile
echo "LIBS= be tracker textencoding z" $NET >> Makefile
echo "SYSTEM_INCLUDE_PATHS=" ${SYSTEM_INCLUDE_PATHS} >> Makefile
echo "LOCAL_INCLUDE_PATHS = src/shared" >> Makefile
echo 'include $(BUILDHOME)/etc/makefile-engine' >> Makefile

make

mv obj.x86/2ch+ ${DIST}/2ch+
